package com.halflife.parameter.template;

import com.halflife.framework.generator.annotation.Join;
import com.halflife.framework.generator.annotation.QueryAnn;
import com.halflife.framework.generator.build.SimpleBuilder;
import com.halflife.framework.generator.build.UpdataBuilder;
import com.halflife.framework.participant.user.UserView;
import org.junit.jupiter.api.Test;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

@QueryAnn(title = "Templates",mainTitle = "Templates",table = "t_parameter_templates")
public class Template {
    @Test
    public void generate()throws Exception{
        UpdataBuilder builder = new UpdataBuilder();
        builder.buildMapper(this.getClass());
        builder.buildAlterTable(this.getClass());
    }

    private Integer id;
    @QueryAnn(value = "name")
    private String name;
    @QueryAnn(value = "code")
    private String code;
    @QueryAnn(value = "companyId")
    private Long companyId;
    @QueryAnn(value = "Lighting Count")
    private Integer lightCount;
    @QueryAnn(value = "Props Count")
    private Integer propsCount;
    @QueryAnn(value = "Photo Type",operate = "like")
    private String photoType;
    @QueryAnn(value = "Client name",operate = "like")
    private String clientName;
    @QueryAnn(value = "Product category",operate = "like")
    private String productCategory;
    @QueryAnn(value = "Photo style",operate = "like")
    private String photoStyle;
    @QueryAnn(value = "Scene Style",operate = "like")
    private String sceneStyle;
    @QueryAnn(value = "Lighting Style",operate = "like")
    private String lightingStyle;
    @QueryAnn("Notes")
    private String memo;
    @QueryAnn("CreateDate")
    @DateTimeFormat(pattern = "MM/dd/yyyy HH:mm:ss")
    private Date createDate;
    @QueryAnn("ModifyDate")
    @DateTimeFormat(pattern = "MM/dd/yyyy HH:mm:ss")
    private Date modifyDate;
    @QueryAnn("Status")
    private String status;
    @QueryAnn(value = "Valid")
    private Boolean valid;
    @QueryAnn(value = "User Id")
    private Integer userViewId;
    @QueryAnn(value = "User")
    @Join()
    private UserView userView;
    @QueryAnn(value = "creator",operate = "like")
    private String creator;
    @QueryAnn(value = "props",operate = "like")
    private String props;
    @QueryAnn(value = "img1")
    private String img1;
    @QueryAnn(value = "img2")
    private String img2;
    @QueryAnn(value = "img3")
    private String img3;
    @QueryAnn(value = "img4")
    private String img4;
    @QueryAnn(value = "img5")
    private String img5;
    @QueryAnn(value = "img")
    private String img;
    @QueryAnn(value = "spare1")
    private String spare1;
    @QueryAnn(value = "spare2")
    private String spare2;
    @QueryAnn(value = "spare3")
    private String spare3;
    @QueryAnn(value = "viewCount")
    private Integer viewCount;
    @QueryAnn(value = "lastViewTime")
    @DateTimeFormat(pattern = "MM/dd/yyyy HH:mm:ss")
    private Date lastViewTime;
    @QueryAnn(value = "lastViewerName")
    private String lastViewerName;
    @QueryAnn(value = "lastViewerId")
    private Integer lastViewerId;
    @QueryAnn(value = "lastViewerPhoto")
    private String lastViewerPhoto;
    @QueryAnn(value = "pageCount")
    private Integer pageCount;
    public void init(){
//        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
        this.setCreateDate(new Date());

    }
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getValid() {
        return valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }

    public String getPhotoType() {
        return photoType;
    }

    public void setPhotoType(String photoType) {
        this.photoType = photoType;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getProductCategory() {
        return productCategory;
    }

    public void setProductCategory(String productCategory) {
        this.productCategory = productCategory;
    }

    public String getPhotoStyle() {
        return photoStyle;
    }

    public void setPhotoStyle(String photoStyle) {
        this.photoStyle = photoStyle;
    }

    public String getSceneStyle() {
        return sceneStyle;
    }

    public void setSceneStyle(String sceneStyle) {
        this.sceneStyle = sceneStyle;
    }

    public String getLightingStyle() {
        return lightingStyle;
    }

    public void setLightingStyle(String lightingStyle) {
        this.lightingStyle = lightingStyle;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public UserView getUserView() {
        return userView;
    }

    public void setUserView(UserView userView) {
        this.userView = userView;
    }

    public Integer getUserViewId() {
        return userViewId;
    }

    public void setUserViewId(Integer userViewId) {
        this.userViewId = userViewId;
    }

    public Integer getLightCount() {
        return lightCount;
    }

    public void setLightCount(Integer lightCount) {
        this.lightCount = lightCount;
    }

    public Integer getPropsCount() {
        return propsCount;
    }

    public void setPropsCount(Integer propsCount) {
        this.propsCount = propsCount;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getProps() {
        return props;
    }

    public void setProps(String props) {
        this.props = props;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getImg1() {
        return img1;
    }

    public void setImg1(String img1) {
        this.img1 = img1;
    }

    public String getImg2() {
        return img2;
    }

    public void setImg2(String img2) {
        this.img2 = img2;
    }

    public String getImg3() {
        return img3;
    }

    public void setImg3(String img3) {
        this.img3 = img3;
    }

    public String getSpare1() {
        return spare1;
    }

    public void setSpare1(String spare1) {
        this.spare1 = spare1;
    }

    public String getSpare2() {
        return spare2;
    }

    public void setSpare2(String spare2) {
        this.spare2 = spare2;
    }

    public String getSpare3() {
        return spare3;
    }

    public void setSpare3(String spare3) {
        this.spare3 = spare3;
    }

    public Integer getViewCount() {
        return viewCount;
    }

    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }

    public String getImg4() {
        return img4;
    }

    public void setImg4(String img4) {
        this.img4 = img4;
    }

    public String getImg5() {
        return img5;
    }

    public void setImg5(String img5) {
        this.img5 = img5;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Integer getPageCount() {
        return pageCount;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public Date getLastViewTime() {
        return lastViewTime;
    }

    public void setLastViewTime(Date lastViewTime) {
        this.lastViewTime = lastViewTime;
    }

    public String getLastViewerName() {
        return lastViewerName;
    }

    public void setLastViewerName(String lastViewerName) {
        this.lastViewerName = lastViewerName;
    }

    public Integer getLastViewerId() {
        return lastViewerId;
    }

    public void setLastViewerId(Integer lastViewerId) {
        this.lastViewerId = lastViewerId;
    }

    public String getLastViewerPhoto() {
        return lastViewerPhoto;
    }

    public void setLastViewerPhoto(String lastViewerPhoto) {
        this.lastViewerPhoto = lastViewerPhoto;
    }
}
